﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EverBuy.SocialNetworking.Presentation.WebForm.Account.Interfaces;
using EverBuy.SocialNetworking.Presentation.WebForm.Account.Presenters;
using EverBuy.SocialNetworking.Web;

namespace EverBuy.SocialNetworking.Presentation.WebForm.Account
{
    public partial class Login : PageBase, ILogin
    {
        private LoginPresenter _presenter = null;
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            _presenter = new LoginPresenter();
            _presenter.Init(this);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _presenter.RunGetMessage();
        }

        public void DisplayMessage(string message)
        {
            Label1.Text = message;
            //throw new NotImplementedException();
        }

        public void DisplayCaptionForButton(string caption)
        {
            Button1.Text = caption;
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            _presenter.RunGetButtonCaption();
        }
    }
}